From: ack@localhost.localdomain Date: Fri, 30 Jun 2006 16:12:05 +0000 (+0100) Subject: Don't modify global active weight when changing weight of inactive domain. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15912^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=495adc0b6a288490c36081d14907f9863e43fc73;p=xen.git Don't modify global active weight when changing weight of inactive domain. Signed-off-by: Emmanuel Ackaouy --- diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 3b804cd644..98e1e3e6c1 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -622,9 +622,12 @@ csched_dom_cntl( if ( cmd->u.credit.weight != 0 ) { - csched_priv.weight -= sdom->weight; + if ( !list_empty(&sdom->active_sdom_elem) ) + { + csched_priv.weight -= sdom->weight; + csched_priv.weight += cmd->u.credit.weight; + } sdom->weight = cmd->u.credit.weight; - csched_priv.weight += sdom->weight; } if ( cmd->u.credit.cap != (uint16_t)~0U )